<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>

    <div id="clock">
        <h2>the time is now</h2>
        <div id="time">
            <div><span id="hour">00</span><span>hour</span></div>
            <div><span id="minute">00</span><span>minute</span></div>
            <div><span id="second">00</span><span>second</span></div>

        </div>
    </div>

    <script>
        function clock() {

            var hour = document.getElementById('hour');
            var minute = document.getElementById('minute');
            var minute = document.getElementById('second');

            let h = new Date().getHours();
            let m = new Date().getMinutes();
            let s = new Date().getSeconds();

            hour.innerHTML = h;
            minute.innerHTML = m;
            minute.innerHTML = s;
        }

        let interval = setInterval(clock, 1000);
    </script>

</body>

</html>